<?php #20070906 http://www.framework.altervista.org/FrameWork/libs/al_10_libPrint.inc
define('LIBPRINT','1.00');

/************************************************************************/
/* FrameWork  test preview                                              */
/* ==================================================================== */
/*                                                                      */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License.       */
/************************************************************************/

// libprint
$print_op=$_GET['print_op'];
if( $print_op!=""){

/* structure.inc */

//---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
function structure_openBlock($class,$title,$icon){
    if ($class=="")$class="table block";
    if ($icon=="")$icon="themes/".theme()."/images/block.png";

    echo "<div class='$class'>\n";
    createTitle($title,$title,$icon);
}

//---------------------------------------------------------------------------------------------------------------------------------------------------------------------------

function structure_closeBlock(){
    echo "</div>\n";

}
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------------




function print_printapp(){
    $appname=$_GET['appname'];
    $apptitle=apptitle($appname);
    $path="applications";

    echo "<html>\n";
    echo "<body><div>\n";
    if (is_dir("applications/$appname"))
	include "applications/$appname/application.inc";
    else
	include "applications/$appname";
    echo "</div></body>\n";
    echo "</html>\n";
    die();
}


    switch ($print_op){
	case "printapp":
	    print_printapp();
	    break;

    }
}
